<?xml version="1.0" encoding="utf-8" ?>
<Recipe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  Name="ConfigureApplication"
  xmlns="http://schemas.microsoft.com/pag/gax-core"
  Bound="false">
	<xi:include href="../../../TypeAlias.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
	<Caption>Configure Application</Caption>
	<Description>Configures general settings of the whole application.</Description>
	<HostData Priority="1000">
		<Icon File="spsf.ico" />
		<CommandBar Menu="SPSFProjectHelp"/>
		<CommandBar Menu="SPSFSolutionHelp"/>
		<spsf:MetaData
		  Visible="true"
		  BindingType="AnyElementReference"
		  BindingTypeTemplate="AnyElementReferenceTemplate"
		  Enabled="true"
		  ExcludeFromTests="true"
		  CreateVSTemplate="false"
		  Category="Configuration" xmlns:spsf="http://www.spalmblogger.de">
			<spsf:Authors>
				<spsf:Author>Torsten Mandelkow</spsf:Author>
			</spsf:Authors>
			<spsf:VersionHistory>
				<spsf:VersionHistoryEntry>1.0 Initial Recipe</spsf:VersionHistoryEntry>
			</spsf:VersionHistory>
			<spsf:WebPageContent>
				<![CDATA[Configures the generell settings of the project.]]>
			</spsf:WebPageContent>
		</spsf:MetaData>
	</HostData>
	<Arguments>

		<Argument Name="DebuggingWebApp" Type="System.String" Required="false" >
			<Converter Type="AvailableWebApplicationsConverter" />
			<ValueProvider Type="ApplicationConfigValueProvider" ConfigValue="DebuggingWebApp" DefaultValue="" />
		</Argument>
		<Argument Name="StartupUrl" Type="System.String" Required="false" >
			<Converter Type="AvailableWebApplicationsConverter" />
			<ValueProvider Type="ApplicationConfigValueProvider" ConfigValue="StartupUrl" DefaultValue="" />
		</Argument>

		<Argument Name="AutoGenerateManifest" Type="System.Boolean" Required="true">
			<ValueProvider Type="ApplicationConfigValueProvider" ConfigValue="AutoGenerateManifest" DefaultValue="true" />
		</Argument>
		<Argument Name="AutoCreateResxFiles" Type="System.Boolean">
			<ValueProvider Type="ApplicationConfigValueProvider" ConfigValue="AutoCreateResxFiles" DefaultValue="false" />
		</Argument>
		<Argument Name="SharePointVersion">
			<ValueProvider Type="ApplicationConfigValueProvider" ConfigValue="SharePointVersion" DefaultValue="" />
		</Argument>
		
		<Argument Name="SPSFBranding" >
			<ValueProvider Type="BrandingImageProvider" Logo="\Branding\Logo.jpg" />
		</Argument>

	</Arguments>
	<GatheringServiceData>
		<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
			<Pages>
				<Page Height="350">
					<Title>Application Settings</Title>
					<Help>Configure settings of the whole application.</Help>
					<Fields>
						<Field Label="Branding" ValueName="SPSFBranding" PanelType="SPALM.SharePointSoftwareFactory.Library.BrandingPanel, SPALM.SharePointSoftwareFactory.Library" />
						<Field PanelType="SPALM.SharePointSoftwareFactory.Library.NameValueDropDownPanel, SPALM.SharePointSoftwareFactory.Library" ValueName="DebuggingWebApp" Label="Local Site for debugging" >
							<Help>Optional Url. Name of a SharePoint site for local debugging.</Help>
						</Field>
						<Field PanelType="SPALM.SharePointSoftwareFactory.Library.NameValueDropDownPanel, SPALM.SharePointSoftwareFactory.Library" ValueName="StartupUrl" Label="Local Site for testing" >
							<Help>Optional Url. Name of a SharePoint site for local testing.</Help>
						</Field>
						<Field ValueName="SharePointVersion" Label="SharePoint Version">
							<Help>Required String. Specifies the target SharePoint version.</Help>
						</Field>
						<Field ValueName="AutoCreateResxFiles" Label="Generate .resx files automatically" >
							<Help>Optional Boolean. If true .resx files are generated automatically.</Help>
						</Field>
					</Fields>
				</Page>
			</Pages>
		</Wizard>
	</GatheringServiceData>
	<Actions>

		<Action Name="SetSiteUrl" Type="SetSiteUrl">
			<Input Name="SiteUrl" RecipeArgument="DebuggingWebApp" />
		</Action>

		<Action Name="SaveStartupUrl" Type="SaveApplicationConfiguration" KeyName="StartupUrl">
			<Input Name="KeyValue" RecipeArgument="StartupUrl" />
		</Action>

		<Action Name="SaveSharePointVersion" Type="SaveApplicationConfiguration" KeyName="SharePointVersion">
			<Input Name="KeyValue" RecipeArgument="SharePointVersion" />
		</Action>

		<Action Name="SaveAutoGenerateManifest" Type="SaveApplicationConfiguration" KeyName="AutoGenerateManifest">
			<Input Name="KeyValue" RecipeArgument="AutoGenerateManifest" />
		</Action>
		<Action Name="SaveAutoCreateResxFiles" Type="SaveApplicationConfiguration" KeyName="AutoCreateResxFiles">
			<Input Name="KeyValue" RecipeArgument="AutoCreateResxFiles" />
		</Action>		

	</Actions>
</Recipe>